package com.ran.java_gobang.model;


import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ran
 * Date: 2025-08-27
 * Time: 0:28
 */
@Data
public class User {
    @NotNull(message = "用户id不能为null")
    private int userId;

    @NotBlank(message = "用户名不能为空")
    @Length(min = 3,max = 20,message = "用户名长度应该在[3,20]之间")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @Length(min = 3,max = 20,message = "密码长度应该在[3,20]之间")
    private String password;

    private int score;
    private int totalCount;
    private int winCount;
    private int draw;
    private Date createTime;
    private Date updateTime;
}
